package com.zrgg.futuwen;

import android.content.Context;
import android.text.TextUtils;

import com.zrgg.futuwen.utils.Logger;

import java.net.MalformedURLException;
import java.net.URL;

public class Urltool {
    public static String appurl;

    public static String init(String url) {
        try {
            URL url1 = new URL(url);
            appurl = url1.getHost();
            return getHost();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        return "www.zrtc.com";
    }

    public static String getOuthHost(String url) {
        try {
            URL url1 = new URL(url);
            return url1.getHost();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        return "";
    }

    public static String getHost() {
        return appurl;
    }

    public static void log(String s) {

        Logger.out(s);
    }

    public static Context getActivity() {
        return null;
    }

    public static void toast(String s) {

    }

    public static boolean isEmpty(String s) {

        return TextUtils.isEmpty(s);
    }

    public static float getWindow_width() {
        return 0;
    }

    public static float getWindow_hith() {
        return 0;
    }
}